package com.diploma.interaction.service.impl;


import com.diploma.interaction.mapper.DmQxSwrysfTestMapper;
import com.diploma.interaction.model.*;
import com.diploma.interaction.service.SwrysfService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
@Slf4j
public class SwrysfServiceImpl implements SwrysfService {

    @Resource
    DmQxSwrysfTestMapper swrysfMapper;

    @Override
    public DmQxSwrysfTest selectById(String id) {
        DmQxSwrysfTestExample swrysfExample=new DmQxSwrysfTestExample();
        swrysfExample.createCriteria().andSwryDmEqualTo(id);
        List<DmQxSwrysfTest> res=swrysfMapper.selectByExample(swrysfExample);
        if(res.size()==0){
            return null;
        }else{
            return res.get(0);
        }
    }
}
